Comments (5)
Hey @lc60005457, I'm the maintainer of the TypeScript plugin and I'm still trying to figure out why is this happening, do you think it crashes because I override some Parcel stuff? Thanks.
edit: nevermind I've just understand they are two different errors, I will implement the ts-loader
behaviour as you said.
And you are right for the error, I extend Parcel but this should be fixed in the new plugin release where I don't touch Parcel at all. The workaround is to just add parcel-bundler
to the dependencies for now.
from parcel-plugin-vue.
Thank you two @lc60005457 @fathyb . It works well now
from parcel-plugin-vue.
@csvwolf Maybe you need a tsconfig.json
{
"compilerOptions": {
"target": "es5",
"strict": true,
"module": "es2015",
"moduleResolution": "node"
}
}
I find it in https://cn.vuejs.org/v2/guide/typescript.html
You should show your all code or repo url.
from parcel-plugin-vue.
Thank you for your response @lc60005457. I tried the tsconfig and not work.
Here is my repo for the problem: https://github.com/csvwolf/parcel-test
from parcel-plugin-vue.
@csvwolf See https://github.com/lc60005457/parcel-test (deleted)
I just add "dev": "rm -rf .cache && rm -rf dist && parcel index.html",
in
"scripts": {
"dev": "rm -rf .cache && rm -rf dist && parcel index.html",
"test": "echo \"Error: no test specified\" && exit 1"
},
to run npm run dev
instead of run rm -rf .cache && rm -rf dist && parcel index.html
The Reason
I guess that the plugin for 'typescript' extended and overloaded the 'parcel', but the global parcel is not be overloaded.
In your dist code 'another-crayfish-lite.js' (Maybe 7535:0 maybe other)
},{"./app.vue":3,"vue":3}],0:[function(require,module,exports) {
The './app.vue' moduleId eq The 'vue' moduleId.
But my plugin for 'vue' works OK with ts(parcel official).
Other Error
The log show Cannot find module './index.vue'.
The Result of browser is OK!
It's that the plugin for 'typescript' can't find '*.vue'.
In 'ts-loader', that has a 'appendTsSuffixTo' option can used for '*.vue'.
More in https://github.com/TypeStrong/ts-loader#appendtsxsuffixto-regexp-default.
from parcel-plugin-vue.
Related Issues (20)
- [dependency error] No matching version found for require-from-string@^1.1.0
- Dynamic import - Error: Cannot find module 'xxx' HOT 1
- Problem with images in html templates inside .vue components
- Hot-reload/compile not working with single file components HOT 2
- How to run Autoprefixer on styles? HOT 6
- Unknown custom element - using Parcel, SFCs and TypeScript HOT 1
- [Bug] @import statement in <style> section does not work HOT 1
- Vue imported twice
- Vue SFC implementation failed.
- JSPackager issue
- extractCss bug in production environment HOT 2
- Maximum call stack size exceeded when add vue coms.
- Style import doesn't work if async import used HOT 1
- How to use assets within `style` part?
- Can't find module 'vue-hot-reload-api'
- Cannot read property 'targets' of undefined
- Console outputs same error multiple times HOT 1
- Source map does not work HOT 1
- Deprecated too soon
- 需要 1.4.1 版本的 parcel 才能兼容 parcel-plugin-vue + babel 的 import()异步导入 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parcel-plugin-vue.