simple-extension
simple-extension copied to clipboard
无法npm run start和build
1.npm run start的产物在哪里 2.build以后无生成文件
两三年前的项目试试用node 12
其余操作请参考这个项目用的脚手架 https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate
似乎是因为代码中写了作者的路径,会导致build错误:
$ grep "/lock/" simple-extension/src/options/components/*
simple-extension/src/options/components/editor-about.vue: import { StringEdgeStorePage } from '@/Users/lock/Desktop/simple-extension/src/js/i18_string_name'
simple-extension/src/options/components/editor-data.vue: import { GetLanguageString } from '@/Users/lock/Desktop/simple-extension/src/js/i18_string_name'
ERROR in ./src/options/components/editor-about.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./src/options/components/editor-about.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve '@/Users/lock/Desktop/simple-extension/src/js/i18_string_name' in 'F:\simple-extension\src\options\components'
@ ./src/options/components/editor-about.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./src/options/components/editor-about.vue?vue&type=script&lang=js&) 13:2-100 26:39-58
@ ./src/options/components/editor-about.vue?vue&type=script&lang=js&
@ ./src/options/components/editor-about.vue
@ ./node_modules/vue-loader/lib??vue-loader-options!./src/options/components/editor.vue?vue&type=script&lang=js&
@ ./src/options/components/editor.vue?vue&type=script&lang=js&
@ ./src/options/components/editor.vue
@ ./src/options/index.js
@ multi webpack-dev-server/client?http://localhost:3001 webpack/hot/dev-server ./src/options/index.js
ERROR in ./src/options/components/editor-data.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./src/options/components/editor-data.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve '@/Users/lock/Desktop/simple-extension/src/js/i18_string_name' in 'F:\simple-extension\src\options\components'
@ ./src/options/components/editor-data.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./src/options/components/editor-data.vue?vue&type=script&lang=js&) 22:2-98 50:16-33 51:18-35 52:16-33
@ ./src/options/components/editor-data.vue?vue&type=script&lang=js&
@ ./src/options/components/editor-data.vue
@ ./node_modules/vue-loader/lib??vue-loader-options!./src/options/components/editor.vue?vue&type=script&lang=js&
@ ./src/options/components/editor.vue?vue&type=script&lang=js&
@ ./src/options/components/editor.vue
@ ./src/options/index.js
@ multi webpack-dev-server/client?http://localhost:3001 webpack/hot/dev-server ./src/options/index.js
解决办法是将两个文件中的i18_string_name.js改为相对路径:../../js/i18_string_name.js
@void285 已按你的方案修改(未测试
这个扩展已经以chrome v3扩展标准重新开发了